function AdHiddenField() {
	this.Init=function() {
		this._array = new Array();
	};
	
	this.Add = function(k, v) {
		this.Remove(k);
		var obj = new Object();
		obj.Id=k;
		obj.Value = v;
		this._array.push(obj);
	};
	
	this.Get = function(id) { 
		for (var i=0; i<this._array.length; i++) {
			var obj = this._array[i];
			if (obj.Id == id) { 
				return obj;
			}
		}
		return null;
	};	
	this.GetAll=function() {
		return this._array;
	};
	
	this.Clear = function() {
		while(this._array.length > 0) {
			this._array.pop();
		}
	};	
	
	this.Remove = function(id) {		
		for(var i = 0; i < this._array.length; i++) {
			var obj = this._array[i];
			if(obj.Id == id) {				
				this._array.splice(i, 1);				
				return;
			}
		}		
	};
	
	this.GetClientId = function() {
		return this._clientId;
	};
	
	this.GetSplitObjStr = function() {
		return this._splitObj;
	};
	
	this.GetSplitIdValue = function() {
		return this._splitKV;
	};
	
	this.PerformPostBack = function() {
		var hidden = document.getElementById(this.GetClientId());
		if (hidden != null) {
			hidden.value = '';
			for(var i = 0; i < this._array.length; i++) {
				var obj = this._array[i];
				hidden.value += obj.Id + this._splitKV + obj.Value + this._splitObj;
			}
		}
	};
};